package com.ruoyi.project.order.controller;

import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.order.service.IOrderRemoveService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/order")
public class OrderRemoveController extends BaseController {
    @Autowired
    private IOrderRemoveService orderRemoveService;
    @RequiresPermissions("order:remove")
    @PostMapping("/remove")
    @ResponseBody
    public AjaxResult remove(String ids){
        try
        {
            return toAjax(orderRemoveService.deleteOrderByIds(ids));
        }
        catch (Exception e)
        {
            return error(e.getMessage());
        }
    }
}
